package com.digitalchina.lxnsy.viewholder;

import android.view.ViewGroup;
import android.widget.TextView;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.entity.ActivitySignUpVO;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.viewholder
 * 创建人：郑皓
 * 创建时间：2018/8/1 17:10
 * 修改备注：
 * ================================================
 */

public class ActivitySignUpHolder extends BaseViewHolder<ActivitySignUpVO> {

    private TextView tvName;
    private TextView tvTel;
    private TextView tvState;


    public ActivitySignUpHolder(ViewGroup parent) {
        super(parent, R.layout.item_activity_sign_up_list);
        tvName = $(R.id.tv_name);
        tvTel = $(R.id.tv_tel);
        tvState = $(R.id.tv_state);

    }

    @Override
    public void setData(ActivitySignUpVO data) {
        super.setData(data);

        tvName.setText(data.getContacts() + "");
        tvTel.setText(data.getTel() + "");

        if (data.getStatus() == 999) {
            tvState.setText("已取消");
        } else {
            tvState.setText("正常");
        }

    }

}
